--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <menu id="app-menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">About</attribute>
+ <attribute name="action">app.about</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">_Quit</attribute>
+ <attribute name="action">app.quit</attribute>
+ <attribute name="accel"><Primary>q</attribute>
+ </item>
+ </section>
+ </menu>
+</interface>
}
-static void
-startup (GApplication *app)
-{
- GtkBuilder *builder;
- GMenuModel *appmenu;
-
- builder = gtk_builder_new ();
- gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
-
- appmenu = (GMenuModel *)gtk_builder_get_object (builder, "appmenu");
-
- gtk_application_set_app_menu (GTK_APPLICATION (app), appmenu);
-
- g_object_unref (builder);
-}
-
static void
update_header (GtkListBoxRow *row,
GtkListBoxRow *before,
app_entries, G_N_ELEMENTS (app_entries),
app);
- g_signal_connect (app, "startup", G_CALLBACK (startup), NULL);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
status = g_application_run (G_APPLICATION (app), argc, argv);
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <menu id="appmenu">
- <section>
- <item>
- <attribute name="label" translatable="yes">About</attribute>
- <attribute name="action">app.about</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">_Quit</attribute>
- <attribute name="action">app.quit</attribute>
- <attribute name="accel"><Primary>q</attribute>
- </item>
- </section>
- </menu>
<menu id="gear_menu">
<section>
<item>